package com.project.controller;

import com.project.bean.InventoryInfoBean;
import com.project.service.IPutOutStorageService;
import com.project.service.impl.PutOutStorageServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("PutOutStorage")
public class PutOutStorageController {
    @Autowired
    private IPutOutStorageService putOutStorageService;
    @RequestMapping("findInventoryInfo")
    public InventoryInfoBean findInventoryInfo(String productId){
        return putOutStorageService.findInventoryInfo(productId);
    }

    /**
     * 出库产品明细表中的商品
     * @param productId 商品明细的编号（规格表中的）
     * @param number 修改的数量
     * @return  是否修改成功
     */
    @RequestMapping("updateProductNum")
    boolean updateProductNum(String productId,Integer number){
       return putOutStorageService.updateProductNum(productId,number);
    }

}
